package com.core.family.biz.yizhao.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.core.common.gen.IBaseService;
import com.core.family.admin.domain.po.PlatFinanceStatement;
import com.core.family.biz.yizhao.domain.dto.WalletDto;
import com.core.family.biz.yizhao.domain.po.YzWallet;
import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author honglei
 * @version 1.0
 * @time: 2023-7-13 15:03:24
 * @Description 服务实现层接口  钱包表
 */
public interface YzWalletService extends IBaseService<YzWallet> {


    YzWallet getByUserId(int userId);

    YzWallet amountChange(int userId, long amount);

    YzWallet unFrozenAmount(int userId, long amount);

    WxPayMpOrderResult h5pay(Map<String,String> map, HttpServletRequest request);

    WxPayMpOrderResult walletRecharge(Map<String,String> map, HttpServletRequest request);

    PlatFinanceStatement walletRefund(Map<String, String> map, HttpServletRequest request);


    boolean deduct(int userIdFr,int userIdTo, long amount,boolean frozen);

}

